﻿Public Class frmComprobanteBch
    Inherits frmMaster

    Protected Overloads Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If NombreCliente.Split(" ").Length >= 3 Then
                lblNombreCliente.Text = StrConv(NombreCliente.Split(" ")(2) & " " & NombreCliente.Split(" ")(0), VbStrConv.ProperCase)
            Else
                lblNombreCliente.Text = NombreCliente
            End If

            lblNombreCliente.UpdateAfterCallBack = True

            lblPat1.Text = Mid(Patente, 1, 2)
            lblPat1.UpdateAfterCallBack = True
            lblPat2.Text = Mid(Patente, 3, 2)
            lblPat2.UpdateAfterCallBack = True
            lblPat3.Text = Mid(Patente, 5, 2)
            lblPat3.UpdateAfterCallBack = True

            lblPatente.Text = Mid(Patente, 1, 2) & "-" & Mid(Patente, 3, 2) & "-" & Mid(Patente, 5, 2)
            lblPatente.UpdateAfterCallBack = True

            LogOut()
        End If
    End Sub

    Protected Sub btnTerminar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnTerminar.Click
        LogOut(True)
    End Sub
End Class